package model;

import java.util.Collection;
import java.util.LinkedList;
import java.util.Observable;
import java.util.Observer;

import model.collisions2d.CollisionContainer;

/**
 * Interface to the Game Model, used by the View and the Controller
 * @author SwiftPengu
 *
 */
public class ModelContext implements Observer{
	private final Collection<ModelObject> models = new LinkedList<ModelObject>();
	private CollisionContainer cc = new CollisionContainer();
	
	public void update(){
		//execute destruction and spawning events
	}
	
	public void destroy(ModelObject mo){
		cc.unWatchObject(mo);
	}
	
	public void spawn(ModelObject mo){
		cc.watchObject(mo);
	}
	
	public Collection<ModelObject> getModelObjects(){
		return models;
	}
	
	public int getObjectCount(){
		return models.size();
	}

	@Override
	public void update(Observable arg0, Object arg1) {
		
	}
}
